<table>
  <thead>
    <tr>
      <th class="text-left">Name</th>
      <%= if measurement_key == :run_time_data do %>
        <th>Iterations per Second</th>
      <% end %>
      <th>Average</th>
      <th>Deviation</th>
      <th>Median</th>
      <th>Mode</th>
      <th>Minimum</th>
      <th>Maximum</th>
      <th>Sample size</th>
    </tr>
  </thead>
  <tbody>
    <%= for scenario <- scenarios do %>
      <% statistics = Map.fetch!(scenario, measurement_key).statistics%>
      <tr>
        <%= case Keyword.get(options, :path_information) do %>
        <% {base_name, input_name} -> %>
          <td class="text-left"><a href="<%= relative_file_path(base_name, [input_name, scenario.name]) %>"><%= scenario.name %></a></td>
        <% nil -> %>
          <td class="text-left"><%= scenario.name %></td>
        <% end %>
        <%= if measurement_key == :run_time_data do %>
          <td><%= format_property statistics.ips, units.ips %></td>
          <td><%= format_property statistics.average, units.run_time %></td>
          <td><%= format_percent statistics.std_dev_ratio %></td>
          <td><%= format_property statistics.median, units.run_time %></td>
          <td><%= format_mode statistics.mode, units.run_time %></td>
          <td><%= format_property statistics.minimum, units.run_time %></td>
          <td><%= format_property statistics.maximum, units.run_time %></td>
        <% else %>
          <td><%= format_property statistics.average, units.memory %></td>
          <td><%= format_percent statistics.std_dev_ratio %></td>
          <td><%= format_property statistics.median, units.memory %></td>
          <td><%= format_mode statistics.mode, units.memory %></td>
          <td><%= format_property statistics.minimum, units.memory %></td>
          <td><%= format_property statistics.maximum, units.memory %></td>
        <% end %>
        <td><%= statistics.sample_size %></td>
      </tr>
    <% end %>
  </tbody>
</table>
